package sbpme.designer.command;

import org.eclipse.gef.commands.Command;

import sbpme.designer.model.Activity;


public class ActivityRenameCommand extends Command {

	private Activity source;
	private String newName;
	private String oldName;

	public void execute() {
		source.setName(newName);
	}

	public void setName(String string) {
		newName = string;
	}

	public void setOldName(String string) {
		oldName = string;
	}

	public void setSource(Activity activity) {
		source = activity;
	}

	public void undo() {
		source.setName(oldName);
	}

}
